//-------------------------------------------------------------------------
// Copyright (c) 2000-2016 Digital. All Rights Reserved.
//
// This software is the confidential and proprietary information of
// Digital
//
// Original author: allnas
//
//-------------------------------------------------------------------------
// APACHE
//-------------------------------------------------------------------------
package com.zj.dubbo.user.service;

import com.zj.dubbo.RpcRunTimeException;
import com.zj.dubbo.entity.User;
import com.zj.dubbo.response.DubboResponse;

import java.util.List;

/**
 * @author zhaojin
 */
public interface UserService {
    /**
     * 保存
     *
     * @param user
     * @return
     */
    DubboResponse<Integer> save(User user);

    /**
     * 批量保存
     *
     * @param users
     * @return
     */
    DubboResponse<Integer> batchSave(List<User> users);

    /**
     * 删除
     *
     * @param id
     * @return
     */
    DubboResponse<Integer> delete(int id);

    /**
     * 更新
     *
     * @param user
     * @return
     */
    DubboResponse<Integer> update(User user);

    /**
     * 检查用户是否合法
     *
     * @param user
     * @return
     */
    DubboResponse<String> check(User user) throws RpcRunTimeException;
}
